<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>透明的单例类的编写优化版</title>
</head>
<body>
<button id="loginBtn">
    登陆
</button>
<script>
    var calculateBonus = function (performanceLevel,salary) {
        if(performanceLevel === 'S'){
            return salary*4;
        }
        if(performanceLevel === 'B'){
            return salary*3;
        }
        if(performanceLevel === 'A'){
            return salary*2;
        }
    }
    var mon = calculateBonus('B',30000);
    console.log(mon);
</script>
</body>
</html>